#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QLineEdit>
#include<QLabel>
#include<QPushButton>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    // Label显示 "Server IP:"
    QLabel *ipLabel = new QLabel("Server IP:", this);
    ipLabel->setGeometry(10, 10, 100, 20);

    // Line Edit让用户输入服务器端的IP地址
    QLineEdit *ipLineEdit = new QLineEdit(this);
    ipLineEdit->setGeometry(120, 10, 150, 20);

    // Label显示 "Server port:"
    QLabel *portLabel = new QLabel("Server port:", this);
    portLabel->setGeometry(10, 40, 100, 20);

    // Line Edit让用户输入服务器端的端口
    QLineEdit *portLineEdit = new QLineEdit(this);
    portLineEdit->setGeometry(120, 40, 150, 20);

    // Label显示服务器端发来的信息
    QLabel *infoLabel = new QLabel("服务器端发来的信息:", this);
    infoLabel->setGeometry(10, 70, 200, 20);

    // Push Button连接服务器端并显示服务器端发来的信息
    QPushButton *connectButton = new QPushButton("连接服务器端并获取信息", this);
    connectButton->setGeometry(10, 100, 200, 30);

    // Push Button退出客户端程序
    QPushButton *exitButton = new QPushButton("退出客户端程序", this);
    exitButton->setGeometry(220, 100, 140, 30);


}

MainWindow::~MainWindow()
{
    delete ui;
}
